package com.guuyoog.moonweb.controller;

import com.alibaba.dubbo.config.annotation.Reference;
import com.guuyoog.moonserviceapi.api.UserService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author guuyoog
 * @date 2018/7/24
 */
@RestController
public class LoginController {

    @Reference(version = "${demo.service.version}",
            application = "${dubbo.application.id}",
            url = "dubbo://localhost:20880")
    private UserService userService;

    @GetMapping("/page")
    public Object userPage() {
        return userService.getUserList();
    }

}
